<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link rel="Stylesheet" type="text/css" href="doc.css" />
		<title>Validation Example</title>
	</head>
	<body>
		<h1>Validation Example</h1>

		<h2>Introduction</h2>
		<p>
			This example describes the usage of the validation framework within the SDK.
			It demonstrates how to specify constraints for the library meta-model and bind the constraints to
			the library application context.
		</p>

		<h2>References</h2>
		<p>
			Please refer to the document <a href="exampleOverview.html">EMF Validation Framework Examples Overview</a>
			for reviewing the library meta-model used as the basis for demonstrating the capabilities in this example.
		</p>

		<h2>Description</h2>
		<p>
			This example plug-in is named <code>org.eclipse.emf.validation.examples</code>.
			This plug-in contributes the <b>Validation</b> menu to the library
			editor's main menu and context menu. The menu has two items:
			<ol>
				<li>
					<b>Enable Live Validation:</b> This actions registers a <code>EContentAdapter</code> against the library <code>Resource</code> to receive
					immediate notifications. Within the <code>notifyChanged</code> callback the model validation service is called to provide a live validation
					f the <code>Notification</code> object.
				</li>
				<li>
					<b>Validate Elements:</b> This action calls upon the model validation service to provide a batch validation
					of the selected <code>EObjects</code> and their children.
				</li>
			</ol>
		</p>

		<p>
			Please refer to the tutorial <a href="../../tutorials/validationTutorial.html">Validation Tutorial</a> 
			for reviewing the code samples within this example
		</p>

		<img src="validation_general.gif" alt="Validation Example Contributions" />

		<h2>Usage</h2>
		<p>
			Refer to this example if you need:
			<ol>
				<li>To specify constraints for any EMF meta-model (batch and live constraints)</li>
				<li>To specify custom model traversal algorithms for batch validation</li>
				<li>To specify constraint bindings to application contexts</li>
				<li>To listen to validation events</li>
				<li>To define triggers for evaluation of batch and live constraints</li>
			</ol>
		</p>

		<hr />

		<p>
			<a href="https://www.eclipse.org/legal/epl-2.0/">Copyright (c) 2000,2005 IBM Corporation and others.</a>
		</p>
	</body>
</html>
